<script setup lang="ts">
import { setNavigationBarTitle, navigateBack, reLaunch } from '@tarojs/taro';
import { Check as AppNutIconCheck } from '@nutui/icons-vue-taro';
import { onMounted } from 'vue';
import { getCurrentInstance } from '@tarojs/taro';

const params = getCurrentInstance().router?.params as {
  templateName: string;
  /**
   * custom_single编辑页面特殊处理
   * custom页面也要特殊处理
   */
  from?: string;
};
onMounted(() => {
  setNavigationBarTitle({
    title: `${params.templateName || '模版名称'}`,
  });
});
/**
 * 点击返回列表
 */
function backList() {
  //默认（发起审批）和custom页面处理方式（定制发起审批）
  navigateBack({
    delta: 2,
  });
}
</script>

<template>
  <view class="approve-submit-success app-page--1">
    <scroll-view class="app-page__wrapper" :scroll-y="true" :lower-threshold="100">
      <view class="approve-submit-success__header-wrapper">
        <app-nut-icon-check class="approve-submit-success__icon" />
      </view>
      <view>提交成功!</view>
    </scroll-view>
    <view class="approve-submit-success__footer">
      <nut-button block shape="round" type="info" @click="backList()"> 返回列表 </nut-button>
    </view>
  </view>
</template>

<style lang="scss">
@import './index.scss';
</style>
